#include<stdio.h>
int main()
{
    char poker[3];
    int num1=0,num2=0,sum=0;
    printf("Please enter three poker's numbers:");
    for(int i=0;i<=2;i++)
    {scanf("%2c",&poker[i]);
    switch(poker[i])
    {
        case'J':sum=+10;break;
        case'Q':sum=+10;break;
        case'K':sum=+10;break;
        case'A':num1++;break;
        default:num2=poker[i];
        sum=sum+num2-48;
    }
    }
    if (num1==1)
    {
        sum=sum+11;
        if (sum<=21)
        printf("sum:%d\n",sum);
        else
        sum=sum-10;
        printf("sum:%d\n",sum);
    }
    else if (num1==2)
    {
        sum=sum+2;
        printf("sum:%d\n",sum);
    }
    else if(num1==3)
    {
        sum=sum+3;
        printf("sum:%d\n",sum);
    }
    else
    printf("sum:%d\n",sum);
    return 0;
}